var vail = {
	feedbackIcons:function(){
		return {
			valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
		};
	},
	//非空
	NOTNULL:function(message,fieldName){
		return {
			    message: 'The '+message+' is not valid',
			    trigger:"change",
	            validators: {
	                notEmpty: {
	                    message: fieldName + '不能为空！'
	                }
	            }
		};
	},
	//长度限制
	LIMITLENGTH:function(message,fieldName,min,max){
		return {
			    message: 'The '+message+' is not valid',
	            validators: {
	                stringLength:{
	                	min:min,
	                	max:max,
	                	message:fieldName + pageData.overLength + max
	                }
	            }
		};
	},
	//非空长度限制
	NOTNULLLIMIT:function(message,fieldName,min,max){
		return {
			    message: 'The '+message+' is not valid',
			    trigger:"change",
	            validators: {
	            	notEmpty: {
	                    message: fieldName + '不能为空！'
	                },
	                stringLength:{
	                	min:min,
	                	max:max,
	                	message:fieldName + pageData.overLength + max
	                }
	            }
		};
	},
	//非空正则表达式
    REGEX:function(message,fieldName,regex){
    	return {
			    message: 'The '+message+' is not valid',
			    trigger:"change",
	            validators: {
	            	notEmpty: {
	                    message: fieldName + '不能为空！'
	                },
	                stringLength:{
	                	regexp: regex,  
                        message: advCreativeField.turnTime + pageData.numFormat
	                }
	            }
		};
    },
    //正则表达式
    NOTNULLREGEX:function(message,fieldName,regex){
    	return {
			    message: 'The '+message+' is not valid',
			    trigger:"change",
	            validators: {	            	
	                stringLength:{
	                	regexp: regex,  
                        message: advCreativeField.turnTime + pageData.numFormat
	                }
	            }
		};
    },
    //查重复
    REPEAT:function(message,fieldName,max,url,objectName,id,name,columnName){
    	return {
			    message: 'The '+message+' is not valid',
			    trigger:"change",
	            validators: {	            	
	                notEmpty: {
	                    message: fieldName+pageData.notEmpty+'！'
	                } ,	               
	                stringLength: {
	                    max: max,
	                    message: fieldName +pageData.overLength+max+'！'
	                },
				    remote: {
				        url: url,
				        message: fieldName + pageData.hasExists,
				        delay: 1000,
				        type: 'GET',//请求方式
				        dataType: "json",
				        data:{
		                		id : function () {
		                			if(vm[objectName][id] == undefined){
		                				vm[objectName][id] = "";
		                			}
		                			return vm[objectName][id];
		                		},
		                		value: function(){
		                			return vm[objectName][name];
		                		},
		                		columnName : columnName
		                	}				            
				    }
	            }
		};
    }
};